<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class Admin extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('admins',function (Blueprint $table){
           $table->increments('id');
           $table->string('nick_name')->comment('昵称')->default('');
           $table->string('real_name')->comment('真实姓名')->default('');
           $table->string('avatar')->comment('管理员头像')->default('');
           $table->string('password')->comment('密码')->default('');
           $table->tinyInteger('sex')->comment('管理员性别1男2女3未知，默认为3')->default(3);
           $table->ipAddress('last')->comment('上次登录ip地址');
           $table->timestamp('last_time')->comment('上次登录时间');
           $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        //
    }
}
